package com.sectop.bank;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;

public class Bank {
    private int numberOfCustomer;
    private static   List<Customer> customers;
    private static Bank instance = new Bank();

    private Bank(){}
    public static Bank getInstance(){
        customers = new ArrayList<>();
        return instance;
    }

    public void addCustomer(String firstName,String lastName){
        Customer customer = new Customer(firstName, lastName);
        customers.add(customer);
    }
    public int getNumOfCustomers(){
        return customers.size();

    }
    public Customer getCustomer(int indix){
        return customers.get(indix);
    }

    public    List<Customer> getCustomers() {
        return customers;
    }

    public static   void setCustomers(List<Customer> customers) {
        Bank.customers = customers;
    }
}
